# Contributor: Bartłomiej Piotrowski <bpiotrowski@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pcmanfm
pkgver=1.3.2
pkgrel=2
pkgdesc="Extremely fast and lightweight file manager"
arch="all !s390x"
url="https://github.com/lxde/pcmanfm"
license="GPL-2.0-or-later"
makedepends="gtk+3.0-dev libfm-dev libfm-extra-dev intltool"
subpackages="$pkgname-doc $pkgname-lang"
source="
	https://downloads.sourceforge.net/pcmanfm/pcmanfm-$pkgver.tar.xz
	gcc14-werror-incompatible-pointer-types.patch
	"

# secfixes:
#   1.2.5-r1:
#     - CVE-2017-8934

build() {
	./configure \
		--sysconfdir=/etc \
		--prefix=/usr \
		--with-gtk=3
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

	sed -i 's|x-directory/normal|inode/directory|' \
		"$pkgdir"/usr/share/applications/pcmanfm.desktop
}

sha512sums="
bcca1af20500e7a84ebfe5f1efd5a1a2945d32ad3ea5fa945ad908794c56614bd85921fac1e7a3b2fc5ef82267d5d3ffc5ad7065e9878a920dd578cb830776c9  pcmanfm-1.3.2.tar.xz
00d17d0f63c03807da9f4e75d6ea035cad43d763488be0df3f82a154944df0da3f80149588e8ec3aa04c19770114b906ef773ee1451123000ee3e90fc6402089  gcc14-werror-incompatible-pointer-types.patch
"
